package borge.web.teamspirit.client.widgets;

import java.util.List;

import borge.web.teamspirit.client.data.Match;
import borge.web.teamspirit.client.data.TeamPlayer;
import borge.web.teamspirit.client.data.Serie;
import borge.web.teamspirit.client.interfaces.WidgetEventHandler;

import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.VerticalPanel;

public class StatisticsWidget extends BaseWidget {
	
	private VerticalPanel iPanel;
	private FlexTable iTable;
	
	public StatisticsWidget(WidgetEventHandler aEventHandler){
		super(aEventHandler);
		
		iPanel = new VerticalPanel();
		iTable = new FlexTable();
		
		// different for serie, match and player
		// serie should show num matches, won, draw, lost
		// goals made, let in, skytteliga, attendance
		
		// match, goals made, goals let in, skytteliga, attendance
		
		// players, goals made, assist, attendance
	}
	
	private VerticalPanel createSerieSpecificPanel(Serie aSerie){
		
		// show matches played
		// show matches won, draw lost
		// show ..?
		
		return null;
	}
	
	private VerticalPanel createSharedStatsPanel(List<Match> aMatches){
		// If size > 1, then for serie
		// If size == 1, then for match
		
		// show goals made, goals lost
		// show skytteliga (goals, assist, points)
		// show card league (yellow, red cards)
		// show attendance (percent for serie, yes or no for match)
		return null;
	}
	
	private VerticalPanel createPlayerStatsPanel(TeamPlayer aPlayer){
		
		// show goals, assists, points
		// show # times won score league and other stuff
		// show attendance
		// show card stats
		// show # comments..etc
		
		return null;
	}

}
